At present time, the Internet has been developed as the fastest channel for information exchange and communication and has been playing a major role in our daily life. The wild use of the Internet highlights the importance of a WEB site, however, the quality of the WEB page thereof determines the success of the WEB site.
The language used in web page design is HTML; the abbreviation of Hyper Text Markup Language, which differs from regular word process tool in its features of HyperText, HyperLink and HyperMedia, and works with the protocol HTTP (HyperText Transfer Protocol), cross platform communication over World Wide Web (WWW) can be achieved. HTML can be simply composed or edited by a regular text editor, such as Microsoft Word or Microsoft Notebook, which is regarded as another important feature thereof, and employing with the basic skill of HTML's Tag, a fancy web page can be easily created.
Please refer to FIG. 1, which is a diagram showing the system structure in which the user is browsing a web site with a browser. As shown in FIG. 1, a user 10 uses a browser 11 for sending a browsing request 12, the browsing request 12 is then transmitted to a web server 13 through a media (such as Internet). The web server 13 comprises a HTTP server 14, which receives the browsing request 12 and executes the commands contained therein to access a corresponding static web page 15 or execute the CGI programs 16 to generate a dynamic web page 17, finally, the web server 13 transmits the static web page 15 and the dynamic web page 17 generated by the CGI programs 16 to the browser 11 and then to be displayed to the user 11.
The original purpose of HTML language is to display static information, that is, to display rich multimedia information with simple syntactical rules, just like the billboard displaying the advertisement. Since WWW may bring in huge commercial profit, it eventually became widely popular. However, simple static web page gradually can not satisfy the requirement in practice. Especially, when the information the user requested is subject to a time factor and needs to be updated all the time, or the user's information needs to be stored, or the user needs to interact with the web page, CGI program will just work fine instead of the static web page.
Please refer to FIG. 1 again, as seen, a connection session is established between the browser and HTTP server of the web site when the user is using the browser to browse the web page of the web site, then, the HTTP server will retrieve the corresponding web page in HTML files and display it on the browser for user's browsing. In the above situation, since the HTML file (web page) is statical, dynamic information can not be displayed properly on the browser, therefore, the solution that generating the HTML files by program came out, and this is the origin of the CGI program. In other words, a connection session is also established between the browser and HTTP server of the web site when the user is using the browser to browse the CGI type web page on the web site, however, in this time, the HTTP server is not going to retrieve the corresponding HTML files (web page), but instead, to trigger a CGI program to generate a HTML files (web page) and display the HTML files (web page) on the browser for user's browsing.
CGI is the abbreviation of Common Gateway Interface, which establishes the standard of the method for transmitting the parameters and results between the HTTP server and the CGI programs.
As described above, CGI program is a standard interface program, which enables the communication between the HTTP server and the web page to achieve the interactive effects. More, with the CGI programs, the web page can be generated dynamically to display the most updated information of the web server. The information retrieved, when connecting to a CGI object, is not a static one but a HTML data stream dynamically generated by programs, and the data being transmitted back to the browser is being updated all the time, that is, it can be the instant response to the specific request of the user, such as the real time stock information. Simply, CGI program is able to generate dynamic web pages and enable the user to access the data in the legacy system via WWW.
The CGI programs has the following advantages, first, it is pretty hard to create a huge HTML document to contain all the updated data when the data needs to be updated all the time, so the only solution is to generate the HTML documents according to the date being updated. Second, since the data input by the user is received by the WWW server instead of the CGI program itself, CGI program is able to generate the information in HTML format based on the request input by the user. The standard employed by the CGI program itself can properly fulfill the functions described above, besides, the CGI programs is capable of accessing the various type of data in database, and that is the reason why it has been called Common Gateway Interface, just like a gateway to link the WWW system and the WWW server.
For example, a security company has a complete database which contains the history information of stock transaction price, now the requirement is to display the information in the HTML format to the customer for reference. In such situation, a common gateway program is necessary to communicate between the information of stock transaction price and the HTTP server and the CGI program is the choice. The CGI program takes the HTTP user's inquiry and converts it into the commands that can be interpreted by the legacy database to retrieve the information stored therein, then, the information retrieved is converted into HTML document which is transmitted by the HTTP server to the user and is displayed on the user's browser.
Although the CGI program offers a new option for processing the information on the dynamic web page, but as the demand of the dynamic web page increasing sharply, the more various type of data is created, such as the data of image, voice and multimedia is requested more and more gradually, which tremendously increases the loading of the system and slow down the response time to the user. The static web page displayed by the regular HTML program is supposed to rapidly respond to the user who submitted the browsing request, now it has to wait for the result of the CGI program, with which together to be displayed on the user's browser, thus, such process results in much longer time waiting for the response to the browser. Therefore, a new solution is demanded to improve the efficiency and to avoid the waste of system resource. As shown in FIG. 1, a traditional CGI program which embeds the presentation request and the data request into a single web page and further embeds into the same browsing request for HTTP server process now no longer meets the requirement of the efficiency of the web page processing.